﻿using ConfExpert.Forms.Base;
using DevTeam;

using System;
namespace ConfExpert.Forms.Depo.Aksesuar
{
    public partial class SayimAnaliz2 : XForm
    {
        public SayimAnaliz2()
        {
            InitializeComponent();
        }

        private void SayimAnaliz2_Load(object sender, EventArgs e)
        {
            //

            gridView1.Init("GetAksSayimAnaliz2");
            gridView1.AddDetailGrid(gvAksSayim, "Gun");
            gvAksSayim.MakeColumnInvisible("Gun");

            gridView1.FormatAsDate("Gun");

            //gridView1.FormatAsPercentage("DuzeltmeOrani");

            gridView1.FormatAsNumber(0, "ToplamMiktar", "Adet", "SayimEksigi", "SayimFazlasi");
            gridView1.AddSummary("ToplamMiktar", "Adet", "SayimEksigi", "SayimFazlasi");
            gridView1.MakeReadOnly();
            gridView1.BestFitColumns();

            gvAksSayim.FormatAsNumber(0, "GuncelMiktar", "SayimEksigi", "SayimFazlasi");
            gvAksSayim.AddSummary("GuncelMiktar", "SayimEksigi", "SayimFazlasi");
            gvAksSayim.MakeReadOnly();
            gvAksSayim.BestFitColumns();

            txtInfo.Caption = "Completion: %" + gvAksSayim.Dataset().Tables[2].Rows[0][0].ToDecimal() * 100;

            //splitContainerControl1.SizeChanged += MySizeChanged;
        }
    }
}
